/**
 * @file   MainWindow.h
 * @author Djuro Drljaca (djurodrljaca@gmail.com)
 * @date   2013-05-03
 * @brief  DataBus Server Test Application Main Window.
 *
 * Copyright (C) 2013  Djuro Drljaca <djurodrljaca@gmail.com>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QtCore/QModelIndex>
#include "DataBusServer.h"

namespace Ui
{
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    /**
     * @brief MainWindow constructor.
     *
     * @param parent    Parent
     */
    explicit MainWindow(QWidget *parent = 0);

    /**
     * @brief MainWindow destructor
     */
    ~MainWindow();
    
private:
    /**
     * @brief GUI component
     */
    Ui::MainWindow *ui;

    /**
     * @brief DataBus Server
     */
    DataBusServer m_dataBusServer;

private slots:
    /**
     * @brief Start DataBus Server
     */
    void startServer();

    /**
     * @brief Stop DataBus Server
     */
    void stopServer();

    /**
     * @brief Shows selected client information
     */
    void showSelectedClientInfo(const QModelIndex index);
};

#endif // MAINWINDOW_H
